<% include header.ejs %>
<nav id="nav_login">
    <div>
        <a href="/" >首页</a>
        <span ><%= title %></span>
        <a href="/reg">注册</a>
    </div>
</nav>
<p style="height: 44px"></p>

<!--登录表单-->
<div id="form-login">
    <div class="form-login" ng-app="loginApp" ng-controller="loginCtrl">
         <form name="loginForm" ng-submit="processLoginForm(loginForm.$valid)" novalidate>
           <h4>用户登录</h4>

                <input type="text" class="form-control" name="userName" id="userName" ng-minlength="3" ng-maxlength="12" ng-model="loginFormData.userName" ng-pattern="/^[a-zA-Z][a-zA-Z0-9_]{2,11}$/" placeholder="请输入用户名" required>
                <label ng-cloak for="inputError" class="control-label text-danger" ng-show="loginForm.userName.$invalid && !loginForm.userName.$pristine"><i class="glyphicon glyphicon-exclamation-sign"></i>用户名为3-12位只能包含字母、数字、或者字母数字组合</label>
           
           
                <input type="password" class="form-control" id="userPassword" name="password"placeholder="请输入密码" ng-pattern="/[?!a-zA-Z0-9_]{6,16}/" ng-maxlength="16" ng-model="loginFormData.password" required>
                <label ng-cloak for="inputError" class="control-label text-danger" ng-show="loginForm.password.$invalid && !loginForm.password.$pristine"><i class="glyphicon glyphicon-exclamation-sign"></i>6-16位，只能包含字母数字下划线</label>
          
                <button class="btn btn-block btn-success btn-login" ng-disabled="loginForm.$invalid">登录</button>
        </form>
    </div>
</div>

<% include footer.ejs %>

